Skip to content

refactor(cli): centralize TUI actions and key bindings - #1577

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/cli-action-registry
Jul 16, 2026
Merged

refactor(cli): centralize TUI actions and key bindings#1577
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/cli-action-registry

Conversation

@limityan

@limityan limityan commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Centralize CLI actions behind stable IDs and project Slash, Palette, Help, footer, and key bindings from one registry.
  • Resolve optional user key overrides with legacy-default normalization, deterministic conflicts, and reserved recovery keys.
  • Route Startup and Chat through state-aware central dispatch, including consistent mouse and popup navigation.

Scope

This is CLI product-line groundwork. It does not add HarmonyOS TUI/GUI support, change the renderer, or introduce platform-specific runtime code.

Compatibility and behavior

  • Missing shortcut config keeps the current built-in behavior and is not persisted as a user choice.
  • Prior generated default values are normalized; explicit non-default values are preserved.
  • Ctrl+C and popup recovery bindings remain available; invalid or conflicting overrides are explained in Help.
  • Idle and processing availability stays consistent across Slash, Palette, Help, footer, and dispatch.

Adversarial review fixes

  • Normalize shortcuts only when the complete legacy-generated tuple matches; preserve mixed or partial explicit choices.
  • Remove the unused single-variant action-source abstraction and make Startup handler classification exhaustive.
  • Align popup recovery help with runtime behavior: Ctrl+W / Esc now maps to Close All Popups / Back.
  • Keep real PTY/ConPTY coverage outside this PR; current coverage is crossterm event-level tests plus three-platform CI.

Validation

  • cargo +nightly test -p bitfun-cli -- --nocapture (163 + 8 + 4 + 4 passed)
  • cargo +nightly clippy -p bitfun-cli --all-targets (passed; existing repository warnings only)
  • node scripts/check-core-boundaries.mjs
  • pnpm run check:repo-hygiene
  • git diff --check
  • Two independent architecture and product adversarial review rounds; no remaining P0-P3 findings.

@limityan
limityan force-pushed the yanzhn/cli-action-registry branch from c5eddc8 to 96bb4c6 Compare July 16, 2026 09:39
@limityan
limityan marked this pull request as ready for review July 16, 2026 10:01
@limityan
limityan merged commit 1ff48ad into GCWing:main Jul 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant